import { _decorator, Component, Node } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('UIBase')
export abstract class UIBase extends Component {

    public  Show() : void {
        this.node.active = true;
        this.onShow();
    }

    public  Hide() : void {
        this.onHide();
        this.node.active = false;
    }

    public  Close() : void {
        this.onClose(); 
        this.node.destroy();
    }

    protected onShow() :void {}
    protected onHide() :void {}
    protected onClose() :void {}
}


